package org.omg.GIOP;

//
// Helper class for : LocateStatusType_1_0
//
// @author OpenORB Compiler
//
public class LocateStatusType_1_0Helper {
	//
	// Insert LocateStatusType_1_0 into an any
	// @param a an any
	// @param t LocateStatusType_1_0 value
	//
	public static void insert(org.omg.CORBA.Any a,
			org.omg.GIOP.LocateStatusType_1_0 t) {
		a.type(type());
		write(a.create_output_stream(), t);
	}

	//
	// Extract LocateStatusType_1_0 from an any
	// @param a an any
	// @return the extracted LocateStatusType_1_0 value
	//
	public static org.omg.GIOP.LocateStatusType_1_0 extract(org.omg.CORBA.Any a) {
		if (!a.type().equal(type()))
			throw new org.omg.CORBA.MARSHAL();
		return read(a.create_input_stream());
	}

	//
	// Internal TypeCode value
	//
	private static org.omg.CORBA.TypeCode _tc = null;

	//
	// Return the LocateStatusType_1_0 TypeCode
	// @return a TypeCode
	//
	public static org.omg.CORBA.TypeCode type() {
		if (_tc == null) {
			org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
			String[] _members = new String[3];
			_members[0] = "UNKNOWN_OBJECT";
			_members[1] = "OBJECT_HERE";
			_members[2] = "OBJECT_FORWARD";
			_tc = orb.create_enum_tc(id(), "LocateStatusType_1_0", _members);
		}
		return _tc;
	}

	//
	// Return the LocateStatusType_1_0 IDL ID
	// @return an ID
	//
	public static String id() {
		return _id;
	}

	private final static String _id = "IDL:omg.org/GIOP/LocateStatusType_1_0:1.0";

	//
	// Read LocateStatusType_1_0 from a marshalled stream
	// @param istream the input stream
	// @return the readed LocateStatusType_1_0 value
	//
	public static org.omg.GIOP.LocateStatusType_1_0 read(
			org.omg.CORBA.portable.InputStream istream) {
		return LocateStatusType_1_0.from_int(istream.read_ulong());
	}

	//
	// Write LocateStatusType_1_0 into a marshalled stream
	// @param ostream the output stream
	// @param value LocateStatusType_1_0 value
	//
	public static void write(org.omg.CORBA.portable.OutputStream ostream,
			org.omg.GIOP.LocateStatusType_1_0 value) {
		ostream.write_ulong(value.value());
	}

}
